# HTML5 Emoji Crush Game

## games for everyone

- created: 08/11/2020
- latest update: 08/11/2020
- by: subrominda
- email: subrominda@gmail.com

### How to play ?

:- Very easy in playing , you have to match the same emoji and crush them and create your high score ,watch out running time ;)

### Customization

# Customization :-

You can customize very easily, code is clean and very understud :)

-Customize game title | open index.html and find code below

    <title>Emoji Crush</title>                           #Customize game title here

-Customize background and color | open index.html and find code below

    body {

    background-image:url(../bg3.jpg);

    color: #fff;

    overflow: hidden;

    -ms-touch-action: none;

-Control Script section and customize | open index.html and find code below

     <script>

    // Size the canvas to fill the browser viewport.

    jQuery(window).resize(function() {

    cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());

    });

    // Start the Construct 2 project running on window load.

    jQuery(document).ready(function ()

    {

    // Create new runtime using the c2canvas

    cr_createRuntime("c2canvas");

    });

    // Pause and resume on page becoming visible/invisible

    function onVisibilityChanged() {

    if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden)

    cr_setSuspended(true);

    else

    cr_setSuspended(false);

    };

    document.addEventListener("visibilitychange", onVisibilityChanged, false);

    document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);

    document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);

    document.addEventListener("msvisibilitychange", onVisibilityChanged, false);

        </script>

    -Customize in game Images | you can find images in " images " folder,
    ( if you want customize images then follow the images size and replace with your
    image with same size and name for better view )

-Customize buttom & input text | open jquery.min.js and find code below

     button: function(e) {

                            var t = e.nodeName.toLowerCase();

                            return "input" === t && "button" === e.type || "button" === t

                        },

                        text: function(e) {

                            var t;

                            return "input" === e.nodeName.toLowerCase() && "text" === e.type
    && (null == (t = e.getAttribute("type")) || t.toLowerCase() === e.type)

---------------------------------------------------------------------------------------------------------------------------------------------------------

-Customize loading logo | Open emoji cursh folder and find " loading-logo.png " image , youcan edit image

or

onen " c2runtime.js " and find code below to change loading logo

    {

    this.loaderlogo = new Image();

    this.loaderlogo.src = "loading-logo.png";

------------------------------------------------------------------------------------------------------------------------------------------------------------

-Customize block images | open c2runtime.js and find code below

    ["images/block-sheet0.png", 37582, 1, 1, 100, 100, 1, 0.5, 0.5,[],
    [-0.35,-0.35,0,-0.43,0.38,-0.38,0.45,0,0.37,0.37,0,0.5,-0.36,0.36,-0.46,0],0],

    ["images/block-sheet0.png", 37582, 102, 1, 100, 100, 1, 0.5, 0.5,[],
    [-0.32,-0.32,0,-0.47,0.31,-0.31,0.47,0,0.37,0.37,0,0.49,-0.37,0.37,-0.48,0],0],

    ["images/block-sheet0.png", 37582, 1, 102, 100, 100, 1, 0.5, 0.5,[],
    [-0.35,-0.35,0,-0.49,0.35,-0.35,0.46,0,0.37,0.37,0,0.49,-0.38,0.38,-0.46,0],0],

    ["images/block-sheet0.png", 37582, 102, 102, 100, 100, 1, 0.5, 0.5,[],
    [-0.34,-0.34,0,-0.49,0.34,-0.34,0.46,0,0.37,0.37,0,0.5,-0.38,0.38,-0.48,0],0],

    ["images/block-sheet1.png", 45094, 1, 1, 100, 100, 1, 0.5, 0.5,[],[],0],

    ["images/block-sheet1.png", 45094, 102, 1, 100, 100, 1, 0.5, 0.5,[],[],0],

    ["images/block-sheet1.png", 45094, 1, 102, 100, 100, 1, 0.5, 0.5,[],[],0],

    ["images/block-sheet1.png", 45094, 102, 102, 100, 100, 1, 0.5, 0.5,[],[],0]

## If you want customize images then open c2runtime.js file and find images code ( find using ctrl+f and type image name or extention .png , you can now customize images )

-Customize button control | open c2runtime.js and find code below

    };

    Rect.prototype.intersects_rect = function (rc)

    {

    return !(rc.right < this.left || rc.bottom < this.top || rc.left > this.right || rc.top >
     this.bottom);

    };

    Rect.prototype.intersects_rect_off = function (rc, ox, oy)

    {

    return !(rc.right + ox < this.left || rc.bottom + oy < this.top || rc.left + ox >
    this.right || rc.top + oy > this.bottom);

    };

    Rect.prototype.contains_pt = function (x, y)

    {

    return (x >= this.left && x <= this.right) && (y >= this.top && y <= this.bottom);

    };

    Rect.prototype.equals = function (r)

    {

    return this.left === r.left && this.top === r.top && this.right === r.right &&
    this.bottom === r.bottom;

    };

Game is full ready and don't need customize most part.

If you need any help in customization then please email us at :- Subrominda@gmail.com

or leave a comment in item comment box

Thanks :)

### Support

# Support :- We are supporting this game

If you need any help and support you can contact us by email :- subrominda@gmail.com

or comment in item comment box at codecanyon